At 16:26 +0300 on 19/04/1999, Dan Janowski wrote:
> Thanks for giving it a stab. Looking at the available
> operators,
> there is no =* or *= ops available. Although I am curious
> where it
> comes from.
To the best of my knowledge, outer joins are not yet supported in
PostgreSQL. As far as I recall, you can achieve the same effect with a
union.
For example, if you have a people table and a pets table, where each
person's pet is joined to the owner by the owner's id colum, you'll
theoretically do something like:
SELECT surname, firstname, pet_name FROM people, pets WHERE id *= owner_id ORDER BY surname, firstname;
So instead, you'll have to do something like:
SELECT surname, firstname, pet_name FROM people, pets WHERE id = owner_id UNION SELECT surname, firstname, null FROM
peopleWHERE not exist ( SELECT 1 FROM pets WHERE owner_id = id ) ORDER BY surname, firstname;
Excuse me if I goofed something syntactically, I don't have time to
actually create the tables and test the above. Note, however, that a UNION
removes duplicates.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma